﻿using System;
using System.Web;
using System.Threading;
using System.Web.UI;
using System.Xml;

using Rmlife.Site;
using Rmlife.Common;
using Rmlife.Config;
using Rmlife.Model;

namespace Rmlife.Web
{

    public partial class managerbody : PageBase
    {

        public int olid;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                config = GeneralConfigs.GetConfig();


             /* *
              * #region 进行权限判断
                if (oluserinfo.Userid <= 0)
                {
                    Context.Response.Redirect(BaseConfigs.GetSitePath + "login.aspx");
                    return;
                }

                string secques = "";// Users.GetUserInfo(oluserinfo.Userid).Secques;
                // 管理员身份验证
                if (Context.Request.Cookies["vmadmin"] == null || Context.Request.Cookies["vmadmin"]["key"] == null || WebUtils.GetCookiePassword(Context.Request.Cookies["vmadmin"]["key"].ToString(), config.Passwordkey) != (oluserinfo.Password + secques + oluserinfo.Userid.ToString()))
                {
                    Context.Response.Redirect(BaseConfigs.GetSitePath + "login.aspx");
                    return;
                }
                else
                {
                    HttpCookie cookie = HttpContext.Current.Request.Cookies["vmadmin"];
                    cookie.Values["key"] = WebUtils.SetCookiePassword(oluserinfo.Password + secques + oluserinfo.Userid.ToString(), config.Passwordkey);
                    cookie.Expires = DateTime.Now.AddMinutes(config.Expires);
                    HttpContext.Current.Response.AppendCookie(cookie);
                }

                #endregion
              * */

            }
        }
    }
}
